Lines Matching refs:culture
96 private static Assembly GetSatelliteAssembly (Assembly assembly, String resourceName, CultureInfo culture) {
99 + Path.DirectorySeparatorChar + culture.Name
105 /// Loads and returns the satellite assembly for a given culture.
107 private Assembly MySatelliteAssembly (CultureInfo culture) {
108 return GetSatelliteAssembly(MainAssembly, BaseName, culture);
171 /// Instantiates a resource set for a given culture.
182 private static GettextResourceSet InstantiateResourceSet (Assembly satelliteAssembly, String resourceName, CultureInfo culture) {
183 // We expect a class with a culture dependent class name.
184 Type clazz = satelliteAssembly.GetType(ConstructClassName(resourceName)+"_"+culture.Name.Replace('-','_'));
196 /// Returns the array of <c>GettextResourceSet</c>s for a given culture,
199 private GettextResourceSet[] GetResourceSetsFor (CultureInfo culture) {
200 //Console.WriteLine(">> GetResourceSetsFor "+culture);
202 GettextResourceSet[] result = (GettextResourceSet[]) Loaded[culture];
207 result = (GettextResourceSet[]) Loaded[culture];
209 // Determine the GettextResourceSets for the given culture.
210 if (culture.Parent == null || culture.Equals(CultureInfo.InvariantCulture))
211 // Invariant culture.
215 // the result for the parent culture as fallback.
216 GettextResourceSet[] parentResult = GetResourceSetsFor(culture.Parent);
219 satelliteAssembly = MySatelliteAssembly(culture);
226 satelliteResourceSet = InstantiateResourceSet(satelliteAssembly, BaseName, culture);
242 Loaded.Add(culture, result);
246 //Console.WriteLine("<< GetResourceSetsFor "+culture);
261 /// Returns the translation of <paramref name="msgid"/> in a given culture.
267 public override String GetString (String msgid, CultureInfo culture) {
268 foreach (GettextResourceSet rs in GetResourceSetsFor(culture)) {
279 /// <paramref name="msgidPlural"/> in a given culture, choosing the right
289 public virtual String GetPluralString (String msgid, String msgidPlural, long n, CultureInfo culture) {
290 foreach (GettextResourceSet rs in GetResourceSetsFor(culture)) {
303 /// of <paramref name="msgctxt"/> a given culture.
311 public String GetParticularString (String msgctxt, String msgid, CultureInfo culture) {
313 foreach (GettextResourceSet rs in GetResourceSetsFor(culture)) {
325 /// <paramref name="msgctxt"/> in a given culture, choosing the right
337 public virtual String GetParticularPluralString (String msgctxt, String msgid, String msgidPlural, long n, CultureInfo culture) {
339 foreach (GettextResourceSet rs in GetResourceSetsFor(culture)) {
350 /// culture.
362 /// <paramref name="msgidPlural"/> in the current culture, choosing the
378 /// of <paramref name="msgctxt"/> in the current culture.
393 /// <paramref name="msgctxt"/> in the current culture, choosing the